package com.demo.caizi.telemetry;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TelemetryLog {
    private static Logger logger = LoggerFactory.getLogger(TelemetryLog.class);

    private static ObjectMapper mapper= new ObjectMapper();

    public static void log(MetricsLogPOJO metricsLog){

        try {
            logger.info(mapper.writeValueAsString(metricsLog));
        } catch (JsonProcessingException e) {
            //TODO 暂时忽略报错
        }
    }
}
